package messagesimport ()// KRBSafe implements RFC 4120 KRB_SAFE: https://tools.ietf.org/html/rfc4120#section-5.6.1.typeKRBSafestruct { PVNO int`asn1:"explicit,tag:0"` MsgType int`asn1:"explicit,tag:1"` SafeBody KRBSafeBody`asn1:"explicit,tag:2"` Cksum types.Checksum`asn1:"explicit,tag:3"`}// KRBSafeBody implements the KRB_SAFE_BODY of KRB_SAFE.typeKRBSafeBodystruct { UserData []byte`asn1:"explicit,tag:0"` Timestamp time.Time`asn1:"generalized,optional,explicit,tag:1"` Usec int`asn1:"optional,explicit,tag:2"` SequenceNumber int64`asn1:"optional,explicit,tag:3"` SAddress types.HostAddress`asn1:"explicit,tag:4"` RAddress types.HostAddress`asn1:"optional,explicit,tag:5"`}// Unmarshal bytes b into the KRBSafe struct.func ( *KRBSafe) ( []byte) error { , := asn1.UnmarshalWithParams(, , fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBSafe))if != nil {returnprocessUnmarshalReplyError(, ) } := msgtype.KRB_SAFEif .MsgType != {returnkrberror.NewErrorf(krberror.KRBMsgError, "message ID does not indicate a KRB_SAFE. Expected: %v; Actual: %v", , .MsgType) }returnnil}
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.